# Read in the data:
oil_spill <- read_sf(here("data", "oil_spill", "Oil_Spill_Incident_Tracking_%5Bds394%5D.shp")) %>%
clean_names()
ca_counties <- read_sf(here("data", "ca_counties", "CA_Counties_TIGER2016.shp"))
ca_subset <- ca_counties %>%
select(NAME, ALAND) %>%
rename(county_name = NAME, land_area = ALAND)
# Check CRS:
# ca_counties %>% st_crs()
# oil_spill %>% st_crs()
1) Interactive map: oil spill events
# Set the viewing mode to interactive:
tmap_mode(mode = "view")
# Make the map:
tm_shape(ca_subset) +
tm_borders() +
tm_shape(oil_spill) +
tm_dots(col = "royalblue4")